POV-Ray : Newsgroups : povray.pov4.discussion.general : Gamma correction of input colours/image files : Gamma correction of input colours/image files Server Time
3 May 2024 10:28:22 EDT (-0400)
  Gamma correction of input colours/image files  
From: scott
Date: 10 Oct 2008 03:37:58
Message: <48ef0656@news.povray.org>
This is prompted from the discussion in beta-test under colors.inc.

POV4 should allow you to enter colours and use image files that are already 
gamma corrected (ie they look correct on your monitor prior to using in 
POV).  This, I think, is what most users expect when entering colour values 
or using texture files.  They expect the colours to look the same as if they 
were choosing that colour in PowerPoint, or painting with that pixel colour 
in a photo editor.

Currently however, POV assumes all RGB values in the SDL and any RGB values 
from textures are in linear colour space, and uses them directly in the 
rendering core.  This often leads to output not being as expected (see 
numerous posts about "washed out" effect when using image files).

I propose that POV4 has the option to apply the inverse of the display gamma 
to any RGB values or image files used.  This will mean users can directly 
use RGB values and expect the correct output.

Attached is an example, the middle row of spheres is from eg a 2D drawing or 
web page etc.  The top row is the result if you just try to use those 
colours in POV directly, the bottom row is if POV applied inverse gamma to 
those colours prior to rendering.  Note that these are both rendered with 
display gamma of 2.2, if you try a higher display gamma the difference is 
even bigger.

The bottom row is what most users would expect, I think.


Post a reply to this message


Attachments:
Download 'comparison.png' (65 KB)

Preview of image 'comparison.png'
comparison.png


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.